Part Number Hot Search : 
A1382 4580D AX8817 D1527 200AA LM564 IRF530 222M35
Product Description
Full Text Search
 

To Download DS32311007 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  general description the ds3231 is a low-cost, extremely accurate i 2 c real- time clock (rtc) with an integrated temperature- compensated crystal oscillator (tcxo) and crystal. the device incorporates a battery input, and maintains accu- rate timekeeping when main power to the device is inter- rupted. the integration of the crystal resonator enhances the long-term accuracy of the device as well as reduces the piece-part count in a manufacturing line. the ds3231 is available in commercial and industrial temperature ranges, and is offered in a 16-pin, 300-mil so package. the rtc maintains seconds, minutes, hours, day, date, month, and year information. the date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. the clock operates in either the 24-hour or 12-hour format with an am /pm indicator. two programmable time-of- day alarms and a programmable square-wave output are provided. address and data are transferred serially through an i 2 c bidirectional bus. a precision temperature-compensated voltage refer- ence and comparator circuit monitors the status of v cc to detect power failures, to provide a reset output, and to automatically switch to the backup supply when nec- essary. additionally, the rst pin is monitored as a pushbutton input for generating a ? reset. applications servers utility power meters telematics gps features ? accuracy 2ppm from 0c to +40c ? accuracy 3.5ppm from -40c to +85c ? battery backup input for continuous timekeeping ? operating temperature ranges commercial: 0c to +70c industrial: -40c to +85c ? low-power consumption ? real-time clock counts seconds, minutes, hours, day, date, month, and year with leap year compensation valid up to 2100 ? two time-of-day alarms ? programmable square-wave output ? fast (400khz) i 2 c interface ? 3.3v operation ? digital temp sensor output: 3c accuracy ? register for aging trim ? rst output/pushbutton reset debounce input ? underwriters laboratories (ul) recognized ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal ______________________________________________ maxim integrated products 1 19-5170; rev 8; 7/10 ordering information part temp range pin-package ds3231s# 0c to +70c 16 so ds3231sn# -40c to +85c 16 so pin configuration appears at end of data sheet. typical operating circuit #denotes a rohs-compliant device that may include lead that is exempt under rohs requirements. the lead finish is jesd97 category e3, and is compatible with both lead-based and lead- free soldering processes. a "#" anywhere on the top mark denotes a rohs-compliant device. for pricing, delivery, and ordering information, please contact maxim direct at 1-888-629-4642, or visit maxim? website at www.maxim-ic.com. ds3231 v cc scl r pu r pu = t r /c b r pu int/sqw 32khz v bat pushbutton reset sda rst n.c. n.c. n.c. n.c. v cc v cc gnd v cc p n.c. n.c. n.c. n.c. scl sda rst
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal 2 _____________________________________________________________________ absolute maximum ratings recommended operating conditions (t a = t min to t max , unless otherwise noted.) (notes 2, 3) stresses beyond those listed under ?bsolute maximum ratings?may cause permanent damage to the device. these are stress rating s only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specificatio ns is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. voltage range on v cc , v bat , 32khz, scl, sda, rst , int /sqw relative to ground.............................-0.3v to +6.0v junction-to-ambient thermal resistance ( ja ) (note 1)....73?/w junction-to-case thermal resistance ( jc ) (note 1) ......23?/w operating temperature range (noncondensing) .............................................-40? to +85? junction temperature ......................................................+125? storage temperature range ...............................-40? to +85? lead temperature (soldering, 10s) .................................+260? soldering temperature (reflow, 2 times max) lead(pb)-free...............................................................+260? containing lead(pb) .....................................................+240? (see the handling, pc board layout, and assembly section.) parameter symbol conditions min typ max units v cc 2.3 3.3 5.5 v supply voltage v bat 2.3 3.0 5.5 v logic 1 input sda, scl v ih 0.7 x v cc v cc + 0.3 v logic 0 input sda, scl v il -0.3 0.3 x v cc v electrical characteristics (v cc = 2.3v to 5.5v, v cc = active supply (see table 1), t a = t min to t max , unless otherwise noted.) (typical values are at v cc = 3.3v, v bat = 3.0v, and t a = +25?, unless otherwise noted.) (notes 2, 3) parameter symbol conditions min typ max units v cc = 3.63v 200 active supply current i cca (notes 4, 5) v cc = 5.5v 300 a v cc = 3.63v 110 standby supply current i ccs i 2 c bus inactive, 32khz output on, sqw output off (note 5) v cc = 5.5v 170 a v cc = 3.63v 575 temperature conversion current i ccsconv i 2 c bus inactive, 32khz output on, sqw output off v cc = 5.5v 650 a power-fail voltage v pf 2.45 2.575 2.70 v logic 0 output, 32khz, int /sqw, sda v ol i ol = 3ma 0.4 v logic 0 output, rst v ol i ol = 1ma 0.4 v output leakage current 32khz, int /sqw, sda i lo output high impedance -1 0 +1 a input leakage scl i li -1 +1 a rst pin i/o leakage i ol rst high impedance (note 6) -200 +10 a v bat leakage current (v cc active) i batlkg 25 100 na note 1: package thermal resistances were obtained using the method described in jedec specification jesd51-7, using a four- layer board. for detailed information on package thermal considerations, refer to www.maxim-ic.com/thermal-tutorial .
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal _____________________________________________________________________ 3 electrical characteristics (continued) (v cc = 2.3v to 5.5v, v cc = active supply (see table 1), t a = t min to t max , unless otherwise noted.) (typical values are at v cc = 3.3v, v bat = 3.0v, and t a = +25?, unless otherwise noted.) (notes 2, 3) parameter symbol conditions min typ max units output frequency f out v cc = 3.3v or v bat = 3.3v 32.768 khz 0c to +40c 2 frequency stability vs. temperature (commercial)  f/f out v cc = 3.3v or v bat = 3.3v, aging offset = 00h >40c to +70c 3.5 ppm -40c to <0c 3.5 0c to +40c 2 frequency stability vs. temperature (industrial)  f/f out v cc = 3.3v or v bat = 3.3v, aging offset = 00h >40c to +85c 3.5 ppm frequency stability vs. voltage  f/v 1 ppm/v -40c 0.7 +25c 0.1 +70c 0.4 trim register frequency sensitivity per lsb  f/lsb specified at: +85c 0.8 ppm temperature accuracy temp v cc = 3.3v or v bat = 3.3v -3 +3 c first year 1.0 crystal aging  f/f o after reflow, not production tested 0C10 years 5.0 ppm electrical characteristics ( v cc = 0v, v bat = 2.3v to 5.5v , t a = t min to t max , unless otherwise noted.) (note 2) parameter symbol conditions min typ max units v bat = 3.63v 70 active battery current i bata eosc = 0, bbsqw = 0, scl = 400khz (note 5) v bat = 5.5v 150 a v bat = 3.63v 0.84 3.0 timekeeping battery current i batt eosc = 0, bbsqw = 0, en32khz = 1, scl = sda = 0v or scl = sda = v bat (note 5) v bat = 5.5v 1.0 3.5 a v bat = 3.63v 575 temperature conversion current i battc eosc = 0, bbsqw = 0, scl = sda = 0v or scl = sda = v bat v bat = 5.5v 650 a data-retention current i battdr eosc = 1, scl = sda = 0v, +25c 100 na
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal 4 _____________________________________________________________________ ac electrical characteristics (v cc = v cc(min) to v cc(max) or v bat = v bat(min) to v bat(max) , v bat > v cc , t a = t min to t max , unless otherwise noted.) (note 2) parameter symbol conditions min typ max units fast mode 100 400 scl clock frequency f scl standard mode 0 100 khz fast mode 1.3 bus free time between stop and start conditions t buf standard mode 4.7 s fast mode 0.6 hold time (repeated) start condition (note 7) t hd:sta standard mode 4.0 s fast mode 1.3 low period of scl clock t low standard mode 4.7 s fast mode 0.6 high period of scl clock t high standard mode 4.0 s fast mode 0 0.9 data hold time (notes 8, 9) t hd:dat standard mode 0 0.9 s fast mode 100 data setup time (note 10) t su:dat standard mode 250 ns fast mode 0.6 start setup time t su:sta standard mode 4.7 s fast mode 300 rise time of both sda and scl signals (note 11) t r standard mode 20 + 0.1c b 1000 ns fast mode 300 fall time of both sda and scl signals (note 11) t f standard mode 20 + 0.1c b 300 ns fast mode 0.6 setup time for stop condition t su:sto standard mode 4.7 s capacitive load for each bus line c b (note 11) 400 pf capacitance for sda, scl c i/o 10 pf pulse width of spikes that must be suppressed by the input filter t sp 30 ns pushbutton debounce pb db 250 ms reset active time t rst 250 ms oscillator stop flag (osf) delay t osf (note 12) 100 ms temperature conversion time t conv 125 200 ms power-switch characteristics (t a = t min to t max ) parameter symbol conditions min typ max units v cc fall time; v pf(max) to v pf(min) t vccf 300 s v cc rise time; v pf(min) to v pf(max) t vccr 0 s recovery at power-up t rec (note 13) 250 300 ms
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal _____________________________________________________________________ 5 pushbutton reset timing t rst pb db rst power-switch timing v cc t vccf t vccr t rec v pf(max) v pf v pf v pf(min) rst
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal 6 _____________________________________________________________________ data transfer on i 2 c serial bus scl note: timing is referenced to v il(max) and v ih(min) . sda stop start repeated start t buf t hd:sta t hd:dat t su:dat t su:sto t hd:sta t sp t su:sta t high t r t f t low warning: negative undershoots below -0.3v while the part is in battery-backed mode may cause loss of data. note 2: limits at -40? are guaranteed by design and not production tested. note 3: all voltages are referenced to ground. note 4: i cca ?cl clocking at max frequency = 400khz. note 5: current is the averaged input current, which includes the temperature conversion current. note 6: the rst pin has an internal 50k (nominal) pullup resistor to v cc . note 7: after this period, the first clock pulse is generated. note 8: a device must internally provide a hold time of at least 300ns for the sda signal (referred to the v ih(min) of the scl signal) to bridge the undefined region of the falling edge of scl. note 9: the maximum t hd:dat needs only to be met if the device does not stretch the low period (t low ) of the scl signal. note 10: a fast-mode device can be used in a standard-mode system, but the requirement t su:dat 250ns must then be met. this is automatically the case if the device does not stretch the low period of the scl signal. if such a device does stretch the low period of the scl signal, it must output the next data bit to the sda line t r(max) + t su:dat = 1000 + 250 = 1250ns before the scl line is released. note 11: c b ?otal capacitance of one bus line in pf. note 12: the parameter t osf is the period of time the oscillator must be stopped for the osf flag to be set over the voltage range of 0.0v v cc v cc(max) and 2.3v v bat 3.4v. note 13: this delay applies only if the oscillator is enabled and running. if the eosc bit is a 1, t rec is bypassed and rst immedi- ately goes high. the state of rst does not affect the i 2 c interface, rtc, or tcxo.
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal _____________________________________________________________________ 7 typical operating characteristics (v cc = +3.3v, t a = +25?, unless otherwise noted.) standby supply current vs. supply voltage ds3231 toc01 v cc (v) i ccs ( a) 5.0 4.5 4.0 3.5 3.0 2.5 25 50 75 100 125 150 0 2.0 5.5 rst active bsy = 0, scl = sda = v cc supply current vs. supply voltage ds3231 toc02 v bat (v) i bat ( a) 5.3 4.3 3.3 0.7 0.8 0.9 1.0 1.1 1.2 0.6 2.3 v cc = 0v, bsy = 0, sda = scl = v bat or v cc en32khz = 1 en32khz = 0 supply current vs. temperature ds3231 toc03 temperature ( c) i bat ( a) 60 35 10 -15 0.7 0.8 0.9 1.0 0.6 -40 85 v cc = 0, en32khz = 1, bsy = 0, sda = scl = v bat or gnd frequency deviation vs. temperature vs. aging value ds3231 toc04 temperature ( c) frequency deviation (ppm) 60 35 10 -15 -30 -20 -10 0 10 20 30 40 50 60 -40 -40 85 127 32 0 -33 8 delta time and frequency vs. temperature temperature ( c) delta frequency (ppm) delta time (min/year) 80 70 50 60 -10 0 10 20 30 40 -30 -20 -180 -160 -140 -120 -100 -80 -60 -40 -20 0 20 -200 -80 -60 -40 -20 0 -100 -40 ds3231 toc05 crystal +20ppm crystal -20ppm typical crystal, uncompensated ds3231 accuracy band
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal 8 _____________________________________________________________________ block diagram clock and calendar registers user buffer (7 bytes) voltage reference; debounce circuit; pushbutton reset i 2 c interface and address register decode power control v cc v bat gnd scl sda temperature sensor control logic/ divider alarm, status, and control registers oscillator and capacitor array x1 x2 n 32khz n int/sqw square-wave buffer; int/sqw control n rst v cc ds3231 1hz 1hz
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal _____________________________________________________________________ 9 pin description pin name function 1 32khz 32khz output. this open-drain pin requires an external pullup resistor. when enabled, the output operates on either power supply. it may be left open if not used. 2 v cc dc power pin for primary power supply. this pin should be decoupled using a 0.1f to 1.0f capacitor. if not used, connect to ground. 3 int /sqw active-low interrupt or square-wave output. this open-drain pin requires an external pullup resistor connected to a supply at 5.5v or less. this multifunction pin is determined by the state of the intcn bit in the control register (0eh). when intcn is set to logic 0, this pin outputs a square wave and its frequency is determined by rs2 and rs1 bits. when intcn is set to logic 1, then a match between the timekeeping registers and either of the alarm registers activates the int /sqw pin (if the alarm is enabled). because the intcn bit is set to logic 1 when power is first applied, the pin defaults to an interrupt output with alarms disabled. the pullup voltage can be up to 5.5v, regardless of the voltage on v cc . if not used, this pin can be left unconnected. 4 rst active-low reset. this pin is an open-drain input/output. it indicates the status of v cc relative to the v pf specification. as v cc falls below v pf , the rst pin is driven low. when v cc exceeds v pf , for t rst , the rst pin is pulled high by the internal pullup resistor. the active-low, open-drain output is combined with a debounced pushbutton input function. this pin can be activated by a pushbutton reset request. it has an internal 50k  nominal value pullup resistor to v cc . no external pullup resistors should be connected. if the oscillator is disabled, t rec is bypassed and rst immediately goes high. 5C12 n.c. no connection. must be connected to ground. 13 gnd ground 14 v bat backup power-supply input. when using the device with the v bat input as the primary power source, this pin should be decoupled using a 0.1f to 1.0f low-leakage capacitor. when using the device with the v bat input as the backup power source, the capacitor is not required. if v bat is not used, connect to ground. the device is ul recognized to ensure against reverse charging when used with a primary lithium battery. go to www.maxim-ic.com/qa/info/ul . 15 sda serial data input/output. this pin is the data input/output for the i 2 c serial interface. this open-drain pin requires an external pullup resistor. the pullup voltage can be up to 5.5v, regardless of the voltage on v cc . 16 scl serial clock input. this pin is the clock input for the i 2 c serial interface and is used to synchronize data movement on the serial interface. up to 5.5v can be used for this pin, regardless of the voltage on v cc . detailed description the ds3231 is a serial rtc driven by a temperature- compensated 32khz crystal oscillator. the tcxo pro- vides a stable and accurate reference clock, and maintains the rtc to within ? minutes per year accu- racy from -40? to +85?. the tcxo frequency output is available at the 32khz pin. the rtc is a low-power clock/calendar with two programmable time-of-day alarms and a programmable square-wave output. the int /sqw provides either an interrupt signal due to alarm conditions or a square-wave output. the clock/cal- endar provides seconds, minutes, hours, day, date, month, and year information. the date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. the clock operates in either the 24-hour or 12-hour format with an am /pm indicator. the internal registers are accessible though an i 2 c bus interface. a temperature-compensated voltage reference and comparator circuit monitors the level of v cc to detect power failures and to automatically switch to the back- up supply when necessary. the rst pin provides an external pushbutton function and acts as an indicator of a power-fail event. operation the block diagram shows the main elements of the ds3231. the eight blocks can be grouped into four functional groups: tcxo, power control, pushbutton function, and rtc. their operations are described sep- arately in the following sections.
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal 10 ____________________________________________________________________ 32khz tcxo the temperature sensor, oscillator, and control logic form the tcxo. the controller reads the output of the on-chip temperature sensor and uses a lookup table to determine the capacitance required, adds the aging correction in age register, and then sets the capaci- tance selection registers. new values, including changes to the age register, are loaded only when a change in the temperature value occurs, or when a user-initiated temperature conversion is completed. temperature conversion occurs on initial application of v cc and once every 64 seconds afterwards. power control this function is provided by a temperature-compensat- ed voltage reference and a comparator circuit that monitors the v cc level. when v cc is greater than v pf , the part is powered by v cc . when v cc is less than v pf but greater than v bat , the ds3231 is powered by v cc . if v cc is less than v pf and is less than v bat , the device is powered by v bat . see table 1. to preserve the battery, the first time v bat is applied to the device, the oscillator will not start up until v cc exceeds v pf , or until a valid i 2 c address is written to the part. typical oscillator startup time is less than one second. approximately 2 seconds after v cc is applied, or a valid i 2 c address is written, the device makes a temperature measurement and applies the calculated correction to the oscillator. once the oscillator is run- ning, it continues to run as long as a valid power source is available (v cc or v bat ), and the device con- tinues to measure the temperature and correct the oscillator frequency every 64 seconds. on the first application of power (v cc ) or when a valid i 2 c address is written to the part (v bat ), the time and date registers are reset to 01/01/00 01 00:00:00 (mm/dd/yy dow hh:mm:ss). v bat operation there are several modes of operation that affect the amount of v bat current that is drawn. while the device is powered by v bat and the serial interface is active, active battery current, i bata , is drawn. when the serial interface is inactive, timekeeping current (i batt ), which includes the averaged temperature conversion current, i battc , is used (refer to application note 3644: power considerations for accurate real-time clocks for details). temperature conversion current, i battc , is specified since the system must be able to support the periodic higher current pulse and still maintain a valid voltage level. data retention current, i battdr , is the current drawn by the part when the oscillator is stopped ( eosc = 1). this mode can be used to mini- mize battery requirements for times when maintaining time and date information is not necessary, e.g., while the end system is waiting to be shipped to a customer. pushbutton reset function the ds3231 provides for a pushbutton switch to be connected to the rst output pin. when the ds3231 is not in a reset cycle, it continuously monitors the rst signal for a low going edge. if an edge transition is detected, the ds3231 debounces the switch by pulling the rst low. after the internal timer has expired (pb db ), the ds3231 continues to monitor the rst line. if the line is still low, the ds3231 continuously monitors the line looking for a rising edge. upon detecting release, the ds3231 forces the rst pin low and holds it low for t rst . rst is also used to indicate a power-fail condition. when v cc is lower than v pf , an internal power-fail sig- nal is generated, which forces the rst pin low. when v cc returns to a level above v pf , the rst pin is held low for approximately 250ms (t rec ) to allow the power supply to stabilize. if the oscillator is not running (see the power control section) when v cc is applied, t rec is bypassed and rst immediately goes high. assertion of the rst output, whether by pushbutton or power-fail detection, does not affect the internal operation of the ds3231. real-time clock with the clock source from the tcxo, the rtc provides seconds, minutes, hours, day, date, month, and year information. the date at the end of the month is auto- matically adjusted for months with fewer than 31 days, including corrections for leap year. the clock operates in either the 24-hour or 12-hour format with an am /pm indicator. the clock provides two programmable time-of-day alarms and a programmable square-wave output. the int /sqw pin either generates an interrupt due to alarm condition or outputs a square-wave signal and the selection is controlled by the bit intcn. supply condition active supply v cc < v pf , v cc < v bat v bat v cc < v pf , v cc > v bat v cc v cc > v pf , v cc < v bat v cc v cc > v pf , v cc > v bat v cc table 1. power control
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal ____________________________________________________________________ 11 figure 1. timekeeping registers note: unless otherwise specified, the registers?state is not defined when power is first applied. a d d r ess bit 7 msb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 lsb function range 00h 0 10 seconds seconds seconds 00?9 01h 0 10 minutes minutes minutes 00?9 am /pm 02h 0 12/ 24 20 hour 10 hour hour hours 1?2 + am /pm 00?3 03h 0 0 0 0 0 day day 1? 04h 0 0 10 date date date 01?1 05h century 0 0 10 month month month/ century 01?2 + century 06h 10 year year year 00?9 07h a1m1 10 seconds seconds alarm 1 seconds 00?9 08h a1m2 10 minutes minutes alarm 1 minutes 00?9 am /pm 09h a1m3 12/ 24 20 hour 10 hour hour alarm 1 hours 1?2 + am /pm 00?3 day alarm 1 day 1? 0ah a1m4 dy/ dt 10 date date alarm 1 date 1?1 0bh a2m2 10 minutes minutes alarm 2 minutes 00?9 am /pm 0ch a2m3 12/ 24 20 hour 10 hour hour alarm 2 hours 1?2 + am /pm 00?3 day alarm 2 day 1? 0dh a2m4 dy/ dt 10 date date alarm 2 date 1?1 0eh eosc bbsqw conv rs2 rs1 intcn a2ie a1ie control 0fh osf 0 0 0 en32khz bsy a2f a1f control/status 10h sign data data data data data data data aging offset 11h sign data data data data data data data msb of temp 12h data data 0 0 0 0 0 0 lsb of temp address map figure 1 shows the address map for the ds3231 time- keeping registers. during a multibyte access, when the address pointer reaches the end of the register space (12h), it wraps around to location 00h. on an i 2 c start or address pointer incrementing to location 00h, the current time is transferred to a second set of regis- ters. the time information is read from these secondary registers, while the clock may continue to run. this eliminates the need to reread the registers in case the main registers update during a read. i 2 c interface the i 2 c interface is accessible whenever either v cc or v bat is at a valid level. if a microcontroller connected to the ds3231 resets because of a loss of v cc or other event, it is possible that the microcontroller and ds3231 i 2 c communications could become unsyn- chronized, e.g., the microcontroller resets while read- ing data from the ds3231. when the microcontroller resets, the ds3231 i 2 c interface may be placed into a known state by toggling scl until sda is observed to be at a high level. at that point the microcontroller should pull sda low while scl is high, generating a start condition. clock and calendar the time and calendar information is obtained by read- ing the appropriate register bytes. figure 1 illustrates the rtc registers. the time and calendar data are set or initialized by writing the appropriate register bytes. the contents of the time and calendar registers are in
ds3231 the binary-coded decimal (bcd) format. the ds3231 can be run in either 12-hour or 24-hour mode. bit 6 of the hours register is defined as the 12- or 24-hour mode select bit. when high, the 12-hour mode is selected. in the 12-hour mode, bit 5 is the am /pm bit with logic-high being pm. in the 24-hour mode, bit 5 is the 20-hour bit (20?3 hours). the century bit (bit 7 of the month register) is toggled when the years register overflows from 99 to 00. the day-of-week register increments at midnight. values that correspond to the day of week are user- defined but must be sequential (i.e., if 1 equals sunday, then 2 equals monday, and so on). illogical time and date entries result in undefined operation. when reading or writing the time and date registers, sec- ondary (user) buffers are used to prevent errors when the internal registers update. when reading the time and date registers, the user buffers are synchronized to the internal registers on any start and when the register pointer rolls over to zero. the time information is read from these secondary registers, while the clock contin- ues to run. this eliminates the need to reread the regis- ters in case the main registers update during a read. the countdown chain is reset whenever the seconds regis- ter is written. write transfers occur on the acknowledge from the ds3231. once the countdown chain is reset, to avoid rollover issues the remaining time and date registers must be written within 1 second. the 1hz square-wave out- put, if enabled, transitions high 500ms after the seconds data transfer, provided the oscillator is already running. alarms the ds3231 contains two time-of-day/date alarms. alarm 1 can be set by writing to registers 07h to 0ah. alarm 2 can be set by writing to registers 0bh to 0dh. the alarms can be programmed (by the alarm enable and intcn bits of the control register) to activate the int /sqw output on an alarm match condition. bit 7 of each of the time-of-day/date alarm registers are mask bits (table 2). when all the mask bits for each alarm are logic 0, an alarm only occurs when the values in the timekeeping registers match the corresponding values stored in the time-of-day/date alarm registers. the alarms can also be programmed to repeat every sec- ond, minute, hour, day, or date. table 2 shows the pos- sible settings. configurations not listed in the table will result in illogical operation. the dy/ dt bits (bit 6 of the alarm day/date registers) control whether the alarm value stored in bits 0 to 5 of that register reflects the day of the week or the date of the month. if dy/ dt is written to logic 0, the alarm will be the result of a match with date of the month. if dy/ dt is written to logic 1, the alarm will be the result of a match with day of the week. when the rtc register values match alarm register set- tings, the corresponding alarm flag ?1f?or ?2f?bit is set to logic 1. if the corresponding alarm interrupt enable ?1ie?or ?2ie?is also set to logic 1 and the intcn bit is set to logic 1, the alarm condition will acti- vate the int /sqw signal. the match is tested on the once-per-second update of the time and date registers. extremely accurate i 2 c-integrated rtc/tcxo/crystal 12 ____________________________________________________________________ table 2. alarm mask bits alarm 1 register mask bits (bit 7) dy/ dt a1m4 a1m3 a1m2 a1m1 alarm rate x 1 1 1 1 alarm once per second x 1 1 1 0 alarm when seconds match x 1 1 0 0 alarm when minutes and seconds match x 1 0 0 0 alarm when hours, minutes, and seconds match 0 0 0 0 0 alarm when date, hours, minutes, and seconds match 1 0 0 0 0 alarm when day, hours, minutes, and seconds match alarm 2 register mask bits (bit 7) dy/ dt a2m4 a2m3 a2m2 alarm rate x 1 1 1 alarm once per minute (00 seconds of every minute) x 1 1 0 alarm when minutes match x 1 0 0 alarm when hours and minutes match 0 0 0 0 alarm when date, hours, and minutes match 1 0 0 0 alarm when day, hours, and minutes match
special-purpose registers the ds3231 has two additional registers (control and status) that control the real-time clock, alarms, and square-wave output. control register (0eh) bit 7: enable oscillator ( eosc ). when set to logic 0, the oscillator is started. when set to logic 1, the oscilla- tor is stopped when the ds3231 switches to v bat . this bit is clear (logic 0) when power is first applied. when the ds3231 is powered by v cc , the oscillator is always on regardless of the status of the eosc bit. when eosc is disabled, all register data is static. bit 6: battery-backed square-wave enable (bbsqw). when set to logic 1 with intcn = 0 and v cc < v pf , this bit enables the square wave. when bbsqw is logic 0, the int /sqw pin goes high impedance when v cc < v pf . this bit is disabled (logic 0) when power is first applied. bit 5: convert temperature (conv). setting this bit to 1 forces the temperature sensor to convert the temper- ature into digital code and execute the tcxo algorithm to update the capacitance array to the oscillator. this can only happen when a conversion is not already in progress. the user should check the status bit bsy before forcing the controller to start a new tcxo exe- cution. a user-initiated temperature conversion does not affect the internal 64-second update cycle. a user-initiated temperature conversion does not affect the bsy bit for approximately 2ms. the conv bit remains at a 1 from the time it is written until the conver- sion is finished, at which time both conv and bsy go to 0. the conv bit should be used when monitoring the status of a user-initiated conversion. bits 4 and 3: rate select (rs2 and rs1). these bits control the frequency of the square-wave output when the square wave has been enabled. the following table shows the square-wave frequencies that can be select- ed with the rs bits. these bits are both set to logic 1 (8.192khz) when power is first applied. bit 2: interrupt control (intcn). this bit controls the int /sqw signal. when the intcn bit is set to logic 0, a square wave is output on the int /sqw pin. when the intcn bit is set to logic 1, then a match between the timekeeping registers and either of the alarm registers activates the int /sqw output (if the alarm is also enabled). the corresponding alarm flag is always set regardless of the state of the intcn bit. the intcn bit is set to logic 1 when power is first applied. bit 1: alarm 2 interrupt enable (a2ie). when set to logic 1, this bit permits the alarm 2 flag (a2f) bit in the status register to assert int /sqw (when intcn = 1). when the a2ie bit is set to logic 0 or intcn is set to logic 0, the a2f bit does not initiate an interrupt signal. the a2ie bit is disabled (logic 0) when power is first applied. bit 0: alarm 1 interrupt enable (a1ie). when set to logic 1, this bit permits the alarm 1 flag (a1f) bit in the status register to assert int /sqw (when intcn = 1). when the a1ie bit is set to logic 0 or intcn is set to logic 0, the a1f bit does not initiate the int /sqw sig- nal. the a1ie bit is disabled (logic 0) when power is first applied. ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal ____________________________________________________________________ 13 rs2 rs1 square-wave output frequency 0 0 1hz 0 1 1.024khz 1 0 4.096khz 1 1 8.192khz square-wave output frequency control register (0eh) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 name: eosc bbsqw conv rs2 rs1 intcn a2ie a1ie por: 0 0 0 1 1 1 0 0
ds3231 status register (0fh) bit 7: oscillator stop flag (osf). a logic 1 in this bit indicates that the oscillator either is stopped or was stopped for some period and may be used to judge the validity of the timekeeping data. this bit is set to logic 1 any time that the oscillator stops. the following are exam- ples of conditions that can cause the osf bit to be set: 1) the first time power is applied. 2) the voltages present on both v cc and v bat are insufficient to support oscillation. 3) the eosc bit is turned off in battery-backed mode. 4) external influences on the crystal (i.e., noise, leak- age, etc.). this bit remains at logic 1 until written to logic 0. bit 3: enable 32khz output (en32khz). this bit con- trols the status of the 32khz pin. when set to logic 1, the 32khz pin is enabled and outputs a 32.768khz square- wave signal. when set to logic 0, the 32khz pin goes to a high-impedance state. the initial power-up state of this bit is logic 1, and a 32.768khz square-wave signal appears at the 32khz pin after a power source is applied to the ds3231 (if the oscillator is running). bit 2: busy (bsy). this bit indicates the device is busy executing tcxo functions. it goes to logic 1 when the conversion signal to the temperature sensor is asserted and then is cleared when the device is in the 1-minute idle state. bit 1: alarm 2 flag (a2f). a logic 1 in the alarm 2 flag bit indicates that the time matched the alarm 2 regis- ters. if the a2ie bit is logic 1 and the intcn bit is set to logic 1, the int /sqw pin is also asserted. a2f is cleared when written to logic 0. this bit can only be written to logic 0. attempting to write to logic 1 leaves the value unchanged. bit 0: alarm 1 flag (a1f). a logic 1 in the alarm 1 flag bit indicates that the time matched the alarm 1 regis- ters. if the a1ie bit is logic 1 and the intcn bit is set to logic 1, the int /sqw pin is also asserted. a1f is cleared when written to logic 0. this bit can only be written to logic 0. attempting to write to logic 1 leaves the value unchanged. aging offset the aging offset register takes a user-provided value to add to or subtract from the codes in the capacitance array registers. the code is encoded in two? comple- ment, with bit 7 representing the sign bit. one lsb rep- resents one small capacitor to be switched in or out of the capacitance array at the crystal pins. the aging off- set register capacitance value is added or subtracted from the capacitance value that the device calculates for each temperature compensation. the offset register is added to the capacitance array during a normal tem- perature conversion, if the temperature changes from the previous conversion, or during a manual user con- version (setting the conv bit). to see the effects of the aging register on the 32khz output frequency immedi- ately, a manual conversion should be started after each aging register change. positive aging values add capacitance to the array, slowing the oscillator frequency. negative values remove capacitance from the array, increasing the oscillator frequency. the change in ppm per lsb is different at different temperatures. the frequency vs. temperature curve is shifted by the values used in this register. at +25?, one lsb typically provides about 0.1ppm change in frequency. use of the aging register is not needed to achieve the accuracy as defined in the ec tables, but could be used to help compensate for aging at a given tempera- ture. see the typical operating characteristics section for a graph showing the effect of the register on accu- racy over temperature. extremely accurate i 2 c-integrated rtc/tcxo/crystal 14 ____________________________________________________________________ bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 name: sign data data data data data data data por: 0 0 0 0 0 0 0 0 aging offset (10h) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 name: osf 0 0 0 en32khz bsy a2f a1f por: 1 0 0 0 1 x x x status register (0fh)
temperature registers (11h?2h) temperature is represented as a 10-bit code with a res- olution of 0.25? and is accessible at location 11h and 12h. the temperature is encoded in two? complement format. the upper 8 bits, the integer portion, are at location 11h and the lower 2 bits, the fractional portion, are in the upper nibble at location 12h. for example, 00011001 01b = +25.25?. upon power reset, the reg- isters are set to a default temperature of 0? and the controller starts a temperature conversion. the temper- ature is read on initial application of v cc or i 2 c access on v bat and once every 64 seconds afterwards. the temperature registers are updated after each user-initi- ated conversion and on every 64-second conversion. the temperature registers are read-only. i 2 c serial data bus the ds3231 supports a bidirectional i 2 c bus and data transmission protocol. a device that sends data onto the bus is defined as a transmitter and a device receiv- ing data is defined as a receiver. the device that con- trols the message is called a master. the devices that are controlled by the master are slaves. the bus must be controlled by a master device that generates the serial clock (scl), controls the bus access, and gener- ates the start and stop conditions. the ds3231 operates as a slave on the i 2 c bus. connections to the bus are made through the scl input and open-drain sda i/o lines. within the bus specifications, a standard mode (100khz maximum clock rate) and a fast mode (400khz maximum clock rate) are defined. the ds3231 works in both modes. the following bus protocol has been defined (figure 2): data transfer may be initiated only when the bus is not busy. during data transfer, the data line must remain stable whenever the clock line is high. changes in the data line while the clock line is high are interpreted as control signals. accordingly, the following bus conditions have been defined: bus not busy: both data and clock lines remain high. start data transfer: a change in the state of the data line from high to low, while the clock line is high, defines a start condition. stop data transfer: a change in the state of the data line from low to high, while the clock line is high, defines a stop condition. data valid: the state of the data line represents valid data when, after a start condition, the data line is stable for the duration of the high period of the clock signal. the data on the line must be changed during the low period of the clock signal. there is one clock pulse per bit of data. each data transfer is initiated with a start condition and terminated with a stop condition. the number of data bytes transferred between the start and the stop conditions is not limited, and is determined by the master device. the information is transferred byte-wise and each receiver acknowledges with a ninth bit. acknowledge: each receiving device, when addressed, is obliged to generate an acknowledge after the reception of each byte. the master device must generate an extra clock pulse, which is associ- ated with this acknowledge bit. a device that acknowledges must pull down the sda line during the acknowledge clock pulse in such a way that the sda line is stable low during the high period of the acknowledge-related clock pulse. of course, setup and hold times must be taken into account. a master must signal an end of data to the ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal ____________________________________________________________________ 15 temperature register (upper byte) (11h) temperature register (lower byte) (12h) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 name: sign data data data data data data data por: 0 0 0 0 0 0 0 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 name: data data 0 0 0 0 0 0 por: 0 0 0 0 0 0 0 0
ds3231 slave by not generating an acknowledge bit on the last byte that has been clocked out of the slave. in this case, the slave must leave the data line high to enable the master to generate the stop condition. figures 3 and 4 detail how data transfer is accom- plished on the i 2 c bus. depending upon the state of the r/ w bit, two types of data transfer are possible: data transfer from a master transmitter to a slave receiver. the first byte transmitted by the master is the slave address. next follows a number of data bytes. the slave returns an acknowledge bit after each received byte. data is transferred with the most significant bit (msb) first. data transfer from a slave transmitter to a master receiver. the first byte (the slave address) is trans- mitted by the master. the slave then returns an acknowledge bit. next follows a number of data bytes transmitted by the slave to the master. the extremely accurate i 2 c-integrated rtc/tcxo/crystal 16 ____________________________________________________________________ sda scl idle 1? 8 9 1? 8 9 1? 8 9 start condition stop condition repeated start slave address r/w ack ack data ack/ nack data msb first msb lsb msb lsb repeated if more bytes are transferred figure 2. i 2 c data transfer overview ... a xxxxxxxx a 1101000 s 0 xxxxxxxx a xxxxxxxx a xxxxxxxx a p figure 3. data write?lave receiver mode ... a xxxxxxxx a 1101000 s 1 xxxxxxxx a xxxxxxxx a xxxxxxxx a p s - start a - acknowledge (ack) p - stop a - not acknowledge (nack) r/w - read/write or direction bit address data transferred (x + 1 bytes + acknowledge) note: last data byte is followed by a nack. master to slave slave to master figure 4. data read?lave transmitter mode
master returns an acknowledge bit after all received bytes other than the last byte. at the end of the last received byte, a not acknowledge is returned. the master device generates all the serial clock puls- es and the start and stop conditions. a transfer is ended with a stop condition or with a repeated start condition. since a repeated start condition is also the beginning of the next serial transfer, the bus will not be released. data is transferred with the most significant bit (msb) first. the ds3231 can operate in the following two modes: slave receiver mode (ds3231 write mode): serial data and clock are received through sda and scl. after each byte is received, an acknowledge bit is transmitted. start and stop conditions are recog- nized as the beginning and end of a serial transfer. address recognition is performed by hardware after reception of the slave address and direction bit. the slave address byte is the first byte received after the master generates the start condition. the slave address byte contains the 7-bit ds3231 address, which is 1101000, followed by the direction bit (r/ w ), which is 0 for a write. after receiving and decoding the slave address byte, the ds3231 outputs an acknowledge on sda. after the ds3231 acknowl- edges the slave address + write bit, the master transmits a word address to the ds3231. this sets the register pointer on the ds3231, with the ds3231 acknowledging the transfer. the master may then transmit zero or more bytes of data, with the ds3231 acknowledging each byte received. the register pointer increments after each data byte is trans- ferred. the master generates a stop condition to terminate the data write. slave transmitter mode (ds3231 read mode): the first byte is received and handled as in the slave receiver mode. however, in this mode, the direction bit indicates that the transfer direction is reversed. serial data is transmitted on sda by the ds3231 while the serial clock is input on scl. start and stop conditions are recognized as the beginning and end of a serial transfer. address recognition is performed by hardware after reception of the slave address and direction bit. the slave address byte is the first byte received after the master generates a start condition. the slave address byte contains the 7-bit ds3231 address, which is 1101000, fol- lowed by the direction bit (r/ w ), which is 1 for a read. after receiving and decoding the slave address byte, the ds3231 outputs an acknowledge on sda. the ds3231 then begins to transmit data starting with the register address pointed to by the register pointer. if the register pointer is not written to before the initiation of a read mode, the first address that is read is the last one stored in the register point- er. the ds3231 must receive a not acknowledge to end a read. ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal ____________________________________________________________________ 17 s - start sr - repeated start a - acknowledge (ack) p - stop a - not acknowledge (nack) r/w - read/write or direction bit address a xxxxxxxx a 1101000 1101000 ssr 0 a 1 data transferred (x + 1 bytes + acknowledge) note: last data byte is followed by a nack. master to slave slave to master a xxxxxxxx xxxxxxxx a xxxxxxxx a xxxxxxxx a p ... figure 5. data write/read (write pointer, then read)?lave receive and transmit
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal 18 ____________________________________________________________________ chip information substrate connected to ground process: cmos package information for the latest package outline information and land patterns, go to www.maxim-ic.com/packages . note that a ?? ?? or ? ?in the package code indicates rohs status only. package drawings may show a different suffix character, but the draw- ing pertains to the package regardless of rohs status. 16 15 14 13 12 11 10 9 1 2 3 4 5 6 7 8 32khz scl sda v bat gnd n.c. n.c. n.c. n.c. top view so v cc int/sqw n.c. rst n.c. n.c. n.c. ds3231 pin configuration handling, pc board layout, and assembly the ds3231 package contains a quartz tuning-fork crystal. pick-and-place equipment can be used, but precautions should be taken to ensure that excessive shocks are avoided. ultrasonic cleaning should be avoided to prevent damage to the crystal. avoid running signal traces under the package, unless a ground plane is placed between the package and the signal line. all n.c. (no connect) pins must be connect- ed to ground. moisture-sensitive packages are shipped from the fac- tory dry packed. handling instructions listed on the package label must be followed to prevent damage during reflow. refer to the ipc/jedec j-std-020 stan- dard for moisture-sensitive device (msd) classifications and reflow profiles. exposure to reflow is limited to 2 times maximum. package type package code outline no. land pattern no. 16 so w16#h2 21-0042 90-0107
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal ____________________________________________________________________ 19 revision history revision number revision date description pages changed 0 1/05 initial release. changed digital temp sensor output from 2 c to 3 c. 1, 3 updated typical operating circuit. 1 changed t a = -40 c to +85 c to t a = t min to t max . 2, 3, 4 1 2/05 updated block diagram. 8 added ul recognized to features ; added lead-free packages and removed s from top mark info in ordering information table; added ground connections to the n.c. pin in the typical operating circuit . 1 added noncondensing to operating temperature range; changed v pf min from 2.35v to 2.45v. 2 added aging offset specification. 3 relabeled toc4. 7 added arrow showing input on x1 in the block diagram . 8 updated pin descriptions for v cc and v bat . 9 added the i 2 c interface section. 10 figure 1: added sign bit to aging and temperature registers; added msb and lsb. 11 corrected title for rate select bits frequency table. 13 added note that frequency stability over temperature spec is with aging offset register = 00h; changed bit 7 from data to sign (crystal aging offset register). 14 changed bit 7 from data to sign (temperature register); correct pin definitions in i 2 c serial data bus section. 15 2 6/05 modified the handing, pc board layout, and assembly section to refer to j-std-020 for reflow profiles for lead-free and leaded packages. 17 3 11/05 changed lead-free packages to rohs-compliant packages. 1 changed rst and ul bullets in features . 1 changed ec condition v cc > v bat to v cc = active supply (see table 1). 2, 3 modified note 12 to correct t rec operation. 6 added various conditions text to tocs 1, 2, and 3. 7 added text to pin descriptions for 32khz, v cc , and rst . 9 table 1: changed column heading powered by to active supply; changed applied to exceeds v pf in the power control section. 10 indicated bbsqw applies to both sqw and interrupts; simplified temp convert description (bit 5); added output to int /sqw (bit 2). 13 4 10/06 changed the crystal aging section to the aging offset section; changed this bit indicates to this bit controls for the enable 32khz output bit. 14 added warning note to ec table notes; updated note 12. 6 updated the typical operating characteristics graphs. 7 in the power control section, added information about the por state of the time and date registers; in the real-time clock section, added to the description of the rst function. 10 5 4/08 in figure 1, corrected the months date range for 04h from 00C31 to 01C31. 11
ds3231 extremely accurate i 2 c-integrated rtc/tcxo/crystal maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a maxim product. no circu it patent licenses are implied. maxim reserves the right to change the circuitry and specifications without notice at any time. 20 ____________________maxim integrated products, 120 san gabriel drive, sunnyvale, ca 94086 408-737-7600 2010 maxim integrated products maxim is a registered trademark of maxim integrated products, inc. is a registered trademark of maxim integrated products, inc. revision history (continued) revision number revision date description pages changed updated the typical operating circuit . 1 removed the v pu parameter from the recommended dc operating conditions table and added verbiage about the pullup to the pin description table for int /sqw, sda, and scl. 2, 9 added the delta time and frequency vs. temperature graph in the typical operating characteristics section. 7 updated the block diagram . 8 added the v bat operation section, improved some sections of text for the 32khz tcxo and pushbutton reset function sections. 10 added the register bit por values to the register tables. 13, 14, 15 updated the aging offset and temperature registers (11hC12h) sections. 14, 15 6 10/08 updated the i 2 c timing diagrams (figures 3, 4, and 5). 16, 17 7 3/10 removed the s from the top mark in the ordering information table and the pin configuration to match the packaging engineering marking specification. 1, 18 8 7/10 updated the typical operating circuit ; removed the top mark column from the ordering information ; in the absolute maximum ratings section, added the theta-ja and theta-jc thermal resistances and note 1, and changed the soldering temperature to +260c (lead(pb)-free) and +240c (leaded); updated the functional description of the v bat pin in the pin description ; changed the timekeeping registers 02h, 09h, and 0ch to 20 hour in bit 5 of figure 1; updated the bbsqw bit description in the control register (0eh) section; added the land pattern no. to the package information table. 1, 2, 3, 4, 6, 9, 11, 12, 13, 18


▲Up To Search▲   

 
Price & Availability of DS32311007

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X